package jfinal.demo.login;

import jfinal.demo.common.model.Blog;
import jfinal.demo.common.model.User;

public class UserService {
    private static final User dao = new User().dao();

    public User login(String username,String userpass){
        return dao.findFirst("select *  from user where username = ?  and password = ?",username,userpass);
    }

    public User getUserById(String userid){
        return dao.findById(userid);
    }

}
